package com.mokee.Util;

import android.content.res.Resources;

import com.mokee.android.ShipPass.MainActivity;
import com.mokee.android.ShipPass.R;

public class ShipAttrUtil {

	public static String shipTypeInt2String(int shipType){
		String shipTypeString = "单船";
		switch (shipType) {
		case 0:
			shipTypeString = "单船";
			break;
		case 1:
			shipTypeString = "货船";
			break;
		case 2:
			shipTypeString = "客船";
			break;
		case 3:
			shipTypeString = "客货船";
			break;
		case 4:
			shipTypeString = "工程船";
			break;
		case 5:
			shipTypeString = "辅助船";
			break;
		case 6:
			shipTypeString = "高速船舶";
			break;
		case 7:
			shipTypeString = "其他";
			break;

		default:
			shipTypeString = "单船";
			break;
		}
		return shipTypeString;
	}
	
	public static String shipProcess(int process){
		String processString;
		Resources resources = MainActivity.getInstance().getResources();
		switch (process) {
		case 0:
			processString = resources.getString(R.string.process_new_tip);
			break;
		case 1:
			processString = resources.getString(R.string.process_pay_tip);
			break;
		case 2:
			processString = resources.getString(R.string.process_reedit_tip);
			break;
		case 3:
			processString = resources.getString(R.string.process_ban_tip);
			break;
		case 4:
			processString = resources.getString(R.string.process_success_tip);
			break;
		default:
			processString = resources.getString(R.string.process_new_tip);
			break;
		}
		return processString;
	}
	
	public static String shipOrientation(int orientation){
		String[] orientationArray = MainActivity.getInstance().getResources().getStringArray(R.array.array_ship_oritation);
		return orientationArray[orientation];
	}
	
	public static String shipLoadType(int loadType){
		String[] loadTypeArray = MainActivity.getInstance().getResources().getStringArray(R.array.array_ship_load_type);
		return loadTypeArray[loadType];
	}
	
	public static String shipSafeLevel(int safeLevel){
		String[] safeLevelArray = MainActivity.getInstance().getResources().getStringArray(R.array.array_ship_safe_level);
		return safeLevelArray[safeLevel];
	}
}
